package com.mlnx.service.common.enums;

import com.mlnx.common.entity.BaseExceptionMsg;

/**
 * Created by amanda.shan on 2019/11/1.
 */
public enum ResponseEnum implements BaseExceptionMsg {
    SUCCESS("0000", "操作成功"),
    FAILED("999999", "操作失败"),
    ParamError("000001", "参数错误"),
    ServerError("000002", "服务器异常"),
    DeviceStateError("000101", "设备状态保存失败"),

    DeviceNotRegister("000100", "该设备编号未注册"),
    BindDeviceError("000101", "设备绑定失败"),
    BindEcgDeviceError("000102", "心电设备在线，绑定失败"),

    ConfigDeviceError("000103", "设备配置失败"),
    ConfigDeviceNotOnline("000104", "配置设备不在线"),

    DeviceNotOnline("000105", "设备不在线"),
    NotEcgDevice("000106", "设备不是心电设备"),

    BindDeviceExist("000107", "该设备已绑定"),

    LOGIN_FAIL("000108","登录失败"),
    UnBindDeviceGroup("000109","该设备未绑定群组"),

    //******************UI返回错误码，002开头，1用户，2患者，3群组，4设备******************
    UserExisted("002101", "用户已存在"),

    GroupNotEmpty("002301", "群组下有患者"),

    DeviceExisted("002401", "设备已存在"),

    DeviceUnExisted("002403", "设备不存在"),

    PatientUnExisted("002405", "用户不存在");


    private String code;

    private String msg;

    ResponseEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
